#include <tenacitas.tester/tester.h>

using namespace tenacitas;
using namespace std::placeholders;

#include <iostream>
#include <cstdint>

namespace tenacitas {
    namespace tester {
        namespace t01 {

            class setup_test {
            public:
                
                setup_test(){}

                setup_test(setup_test && p_setup_test){}

                void initialize(){}
                void finalize(){}

                void create() const {
                    return;
                }

            };

            class a {
            public:
                a(){}
                a(a && p_a) {}
                a(const a & p_a) {}

                float f(int16_t p_int){
                    return 5.6 * p_int;        
                }
            };


            class a_tester {
            public:
                a_tester(a && p_a)
                    : m_a(std::move(p_a)) {}

                a_tester(const a_tester & p_teste)
                    : m_a(p_teste.m_a){}

                bool exec(const setup_test & p_setup){

                    float l_f = m_a.f(-2);
                    
                    std::cout << l_f << std::endl;
                    
                    return true;
                }

            private:
                a m_a;
            };

            static void run(){
                typedef tester::tests<setup_test> tests;
    
                tests l_tests;

                a l_a;

                a_tester l_a_tester(std::move(l_a));

                tests::test_type l_test = std::bind(&a_tester::exec, l_a_tester, _1);

                l_tests.add(std::string("test11"), std::move(l_test));

                l_tests.run(setup_test());
            }

        }
    }
}
